Skip to content

fix(signing): use public httpcore2 socket option type on main - #1922

Merged
rachitm022 merged 2 commits into
mainfrom
rachitm022/backport-httpcore2-socket-option-main
Nov 17, 2026
Merged

rachitm022 merged 2 commits into
mainfrom
rachitm022/backport-httpcore2-socket-option-main

Conversation

@rachitm022

Copy link
Copy Markdown
Collaborator

Why

main fails repo-wide mypy because httpcore2==2.16.1 no longer explicitly exports SOCKET_OPTION from its private _backends.base module. This also blocks the Python 3.12 CI job on #1921.

The same fix was already reviewed and merged into next in #1916. No open PR currently changes src/adcp/signing/ip_pinned_transport.py on main; this PR brings that fix to the branch whose CI is failing.

What changed

Verification

  • Reproduced the mypy error on origin/main before the backport.
  • uv run --extra dev mypy src/adcp/ packages/adcp-reporting-storage/src/adcp_reporting_storage/ — 1,555 source files, no issues.
  • uv run --extra dev -m pytest tests/conformance/signing/test_ip_pinned_transport.py -q — 393 passed.
  • Ruff check, format check, and git diff --check passed.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean PR, no blocking or medium findings.

Checked:

  • src/adcp/signing/ip_pinned_transport.py moves a TYPE_CHECKING-only SOCKET_OPTION2 import from the private httpcore2._backends.base path to the public httpcore2 top-level. No runtime effect, more stable import shape, mypy-guarded.
  • tests/conformance/signing/test_ip_pinned_transport.py narrows the contract test from full inspect.signature equality to a (name, kind, default) comparison, dropping only annotation parity. Since the override delegates via fixed kwargs, call-compatibility is still verified and the signature-drift guard stays armed — the CI gate is not disabled.

Decision path: high_risk is true via src/adcp/signing/** (modified), but the reviewer found no medium-or-higher concerns, so the modification is presumed safe (row 5 does not fire). gated_paths is false (row 2 N/A). No no-auto-approve team match. Zero findings, so rows 1, 3–8 do not apply → row 9 approve. Note: review_decision is REVIEW_REQUIRED, but that only blocks approval when gated_paths is true, which it is not here.

@rachitm022
rachitm022 merged commit 7389dc1 into main Nov 17, 2026
47 checks passed
@rachitm022
rachitm022 deleted the rachitm022/backport-httpcore2-socket-option-main branch November 17, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant